home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / cuj9204.zip / 1004034B < prev    next >
Text File  |  1992-06-02  |  2KB  |  69 lines

  1. switch ( wParam )
  2.    {
  3.    case IDM_ADD:
  4.       /* Select a File */
  5.       status = FileSelectDialog( hInstance, hWnd,
  6.             Caption, FileSpec );
  7.       if ( status == FAIL || status == FALSE )
  8.          break;   /* Canceled the operation. */
  9.       /* Add file to database */
  10.       status = add_data_to_db( FileSpec );
  11.       break:
  12.    case IDM_DELETE:
  13.       /* Select a Key */
  14.       status = KeySelectDialog( hInstance, hWnd,
  15.             Caption, Key );
  16.       if ( status == FAIL || status == FALSE )
  17.          break;   /* Canceled the operation. */
  18.       /* Delete Keyed Data from database */
  19.       status = del_data_from_db( Key );
  20.       break;
  21.    case IDM_GET:
  22.       /* Select a Key */
  23.       KeySelectDialog( hInstance, hWnd,
  24.             Caption, Key );
  25.       if ( status == FAIL || status == FALSE )
  26.          break;   /* Canceled the operation. */
  27.       /* Select a File */
  28.       FileSelectDialog( hInstance, hWnd,
  29.             Caption, FileSpec );
  30.       if ( status == FAIL || status == FALSE )
  31.          break;   /* Canceled the operation. */
  32.       /* Get data from database and store in File */
  33.       status = get_data_from_db( Key, FileSpec );
  34.       break;
  35.    case IDM_REPLACE:
  36.       /* Select a Key */
  37.       KeySelectDialog( hInstance, hWnd,
  38.             Caption, Key );
  39.       if ( status == FAIL || status == FALSE )
  40.          break;   /* Canceled the operation. */
  41.       /* Select a data file */
  42.       FileSelectDialog( hInstance, hWnd,
  43.             Caption, FileSpec );
  44.       if ( status == FAIL || status == FALSE )
  45.          break;   /* Canceled the operation. */
  46.       /* Replace Key data with data in FileSpec */
  47.       status = replace_data_in_db( Key, FileSpec );
  48.       break;
  49.    case IDM_VERIFY:
  50.       /* Select a Key */
  51.       KeySelectDialog( hInstance, hWnd,
  52.             Caption, Key );
  53.       if ( status == FAIL || status == FALSE )
  54.          break;   /* Canceled the operation. */
  55.       /* Select a File */
  56.       FileSelectDialog( hInstance, hWnd,
  57.             Caption, FileSpec );
  58.       if ( status == FAIL || status == FALSE )
  59.          break;   /* Canceled the operation. */
  60.       /* Verify Data in database (Key) matches
  61.       ** data in FileSpec */
  62.       status = vrfy_data_in_db( Key, FileSpec );
  63.       break;
  64.    default:
  65.       status = FAIL;
  66.       break;
  67.    }   /* switch ( wParam ) */
  68.  
  69.